package com.dzh.service;

import com.dzh.dao.BookMapper;
import com.dzh.dao.ClassMapper;
import com.dzh.pojo.Books;
import com.dzh.pojo.ClassRes;
import com.dzh.pojo.Clazz;

import java.util.List;

public class ClassServiceImpl implements ClassService{
    private ClassMapper classMapper;

    public void setClassMapper(ClassMapper classMapper) {
        this.classMapper = classMapper;
    }

    @Override
    public int addClass(Clazz clazz) {
        return classMapper.addClass(clazz);
    }

    @Override
    public int deleteClassById(int classId) {
        return classMapper.deleteClassById(classId);
    }

    @Override
    public int updateClass(Clazz clazz) {
        return classMapper.updateClass(clazz);
    }

    @Override
    public Clazz queryClassById(int classId) {
        return classMapper.queryClassById(classId);
    }

    @Override
    public List<ClassRes> queryAllClass() {
        return classMapper.queryAllClass();
    }

    @Override
    public Clazz queryClassByName(Clazz clazz) {
        return classMapper.queryClassByName(clazz);
    }
}
